jquery.ba-throttle-debounce.min.js ➔ a   A
last analyzed

Complexity

Conditions 3
Paths 6

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
nc 6
nop 4
dl 0
loc 1
rs 10
c 0
b 0
f 0
1
/*
2
 * jQuery throttle / debounce - v1.1 - 3/7/2010
3
 * http://benalman.com/projects/jquery-throttle-debounce-plugin/
4
 * 
5
 * Copyright (c) 2010 "Cowboy" Ben Alman
6
 * Dual licensed under the MIT and GPL licenses.
7
 * http://benalman.com/about/license/
8
 */
9
(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this);